
import requests

cookies = {
    'csrf_token': '0b493e5e0b20de9ab6497d5d33925bd1',
    'PHPSESSID': 'cba79f9d43f749b659be1ae4fe706be5',
    'cpi': 'eyJDaGFubmVsIjoicGFzc3dvcmQiLCJDbGllbnQiOiJ1IiwiUGVyc29uSWQiOiJmYWI2OWRjNzQ3NDA0M2FmMmZiYTFkNDk4ZThkOTM0NSIsIlVuaXZlcnNpdHlOYW1lIjoi5piT54%2Bt5L2T6aqM5aSn5a2mIn0%3D',
}

headers = {
    'authority': 'api.uyiban.com',
    'accept': '*/*',
    'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
    # Requests sorts cookies= alphabetically
    # 'cookie': 'csrf_token=0b493e5e0b20de9ab6497d5d33925bd1; PHPSESSID=cba79f9d43f749b659be1ae4fe706be5; cpi=eyJDaGFubmVsIjoicGFzc3dvcmQiLCJDbGllbnQiOiJ1IiwiUGVyc29uSWQiOiJmYWI2OWRjNzQ3NDA0M2FmMmZiYTFkNDk4ZThkOTM0NSIsIlVuaXZlcnNpdHlOYW1lIjoi5piT54%2Bt5L2T6aqM5aSn5a2mIn0%3D',
    'origin': 'https://app.uyiban.com',
    'referer': 'https://app.uyiban.com/',
    'sec-ch-ua': '"Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-site',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36',
}

params = {
    'CSRF': '0b493e5e0b20de9ab6497d5d33925bd1',
}

data = {
    'TaskId': 'baae44763b4ae96f91ffd205143a44a1',
    'PersonId': '4bb83589d9b9717fa2a1edbd66c52e65',
    'ChangeReason': '是',
}

response = requests.post('https://api.uyiban.com/epidemicPrevention/admin/record/changeState', params=params, cookies=cookies, headers=headers, data=data)